package com.thon.dao.project;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.thon.dao.util.BaseDao;
import com.thon.dao.util.Page;
import com.thon.entity.project.Project;
import com.thon.entity.project.ProjectContributionView;

/**
 * @file ProjectDao.java
 * @author Zemo
 * @mail zemochen@gmail.com
 * @data 2013年10月11日 上午11:32:46
 * @description: TODO
 */
public interface ProjectDao extends BaseDao<Project> {

	public Page<Project> findAllProjects(int status,Page<Project> page,String queryStr);
	
	public List<Project> listProjectByStatus(int status);

	public List<Project> listProjectBy(String by,Object object);

	public Page<Project> findProjectPage(Page<Project> page, Integer stauts);

	public Page<Project> findProjectByAction(Page<Project> page, int userId,
			String action,int status);

	public Page<Project> findProjectByCategory(Page<Project> page,int categoryId,int status);
	
	public Page<Project> findProjectByRegion(Page<Project> page,int regionId,int status);

	public Long count(String by,int status);
 
	public Page<Project> findProjectSort(Page<Project> page,String by,int status);

	public List<Object> listProjectStatistiBy(Integer projectId,String by);

	public Long getTopestByDate(Integer projectId,Long date);

	public Page<Project> findProjectSortByRemainDay(Page<Project> page,int status);

	public Page<Project> findProjectPageByRecommend(Page<Project> page,int status);
	
	public List<Object> listTopSupports(Integer projectId,Integer num);
	
	public List<Object> listTopShares(Integer projectId,Integer num);
	
	public Long getSupportSum(Integer projectId,Integer userId);
	
	public Object getShare(Integer projectId,Integer userId);
	
	public Page<Project> findProjectByTags(Page<Project> page,String tags);
	
	public Project getProjectByInst(int institutionId,int status);
	
	public List<Project> listProjectsByStatus(int institutionId,int status);
	
	public Long countProjectByStatus(int institutionId,int status);
	
	public Long countProjectByCategory(int categoryId);
	
	public Long countProjectByCategory(int categoryId,int status);
	
	public List<Project> listALLProjectName();
	
	public Page<Project> findProjectByCategory(Page<Project>page,int categoryId);
	
	public Page<Project> findProjectByBenefit(Page<Project>page,int benefitId);
	
	public Page<Project> findProjectByOpen(Page<Project>page,int openId);
	
}
